var viewport = document.querySelector("meta[name=viewport]");
//			var winWidths=$(window).width();
var winWidths = screen.width;
var densityDpi = 720 / winWidths;
densityDpi = densityDpi > 1 ? 300 * 720 * densityDpi / 720 : densityDpi;
if (isWeixin()) {
	viewport.setAttribute('content', 'width=720, user-scalable=no,target-densityDpi=' + densityDpi);
} else {
	viewport.setAttribute('content', 'width=720, user-scalable=no');
	window.setTimeout(function() {
		viewport.setAttribute('content', 'width=720, user-scalable=no');
	}, 100);
}

function isWeixin() {
	var ua = navigator.userAgent.toLowerCase();
	if (ua.match(/MicroMessenger/i) == "micromessenger") {
		return true;
	} else {
		return false;
	}
}